/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package auditenergetic;
//import com.sun.org.apache.xerces.internal.parsers.SAXParser;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import org.xml.sax.*;
import org.xml.sax.helpers.*;



public class Date_Cladire extends DefaultHandler{
      
    
        boolean an = false;
        boolean pereti = false;
        boolean tavane = false;
        boolean pardoseli = false;
        boolean tip_cladire = false;
        boolean nr_utili = false;
        boolean scop = false;
        boolean temperatura_int = false;
       // boolean age = false;
        public static String a,p,ti,t,pp,tt,n,s;
       public void startElement(String nsURI, String strippedName,String tagName, Attributes attributes)
        throws SAXException
        {
            if (tagName.equalsIgnoreCase("an"))
                an = true;
            if (tagName.equalsIgnoreCase("pereti"))
                pereti = true;
            if(tagName.equalsIgnoreCase("tavane"))
                tavane = true;
            if (tagName.equalsIgnoreCase("pardoseli"))
                pardoseli = true;
            if (tagName.equalsIgnoreCase("temperatura_int"))
                temperatura_int = true;
            if (tagName.equalsIgnoreCase("tip_cladire"))
                tip_cladire = true;
            if(tagName.equalsIgnoreCase("nr_utili"))
                nr_utili = true;
             if(tagName.equalsIgnoreCase("scop"))
                scop = true;

        }
        public void characters(char[] ch,int start, int length)
        {
            if (an)
            {
                a =  new String(ch,start,length);
                an = false;
            } else if (pereti)
            {
                p = new String(ch,start,length);
                pereti = false;
            } else if (tavane)
            {

                t = new String(ch,start,length);
                tavane = false;
            }else if(pardoseli)
            {
                 pp = new String(ch,start,length);
                 pardoseli = false;
            }else if(temperatura_int)
            {
        	ti = new String(ch,start,length);
        	temperatura_int = false;
            }
            else if(tip_cladire)
            {
                 tt = new String(ch,start,length);
                 tip_cladire = false;
            }else if(nr_utili)
            {
                 n = new String(ch,start,length);
                 nr_utili = false;
            }else if(scop)
            {
                 s = new String(ch,start,length);
                 scop = false;
            }

        }
        public static String print()
        {
            return a+"/"+p+"/"+t+"/"+pp+"/"+ti+"/"+tt+"/"+n+"/"+s;
        }
    }
   


